import java.util.Scanner;

/**
 * <p>计算最小公倍数</p>
 *
 * 最小公倍数等于两数相乘然后除以最大公约数
 *
 * @author: YuanChilde
 * @date: 2020-02-17 8:01
 * @version: 1.0
 * Modification History:
 * Date    Author      Version     Description
 * -----------------------------------------------------------------
 * 2020-02-17 8:01    YuanChilde     1.0        新增
 */
public class Demo3 {

    public static int getMax(int a, int b){
        if (b == 0){
            return a;
        }
        return getMax(b,a%b);
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int min = num1 > num2 ? num2 : num1;
        int max = num1 > num2 ? num1 : num2;
        int maxYueShu = getMax(max, min);
        System.out.println(maxYueShu);
        System.out.println((num1 * num2) / maxYueShu);
    }
}
